package net;

import io.netty.channel.ChannelHandlerContext;
import org.apache.log4j.Logger;

import java.util.concurrent.ConcurrentHashMap;

public class ConnManager {
    private static ConnManager manager;
    private Logger logger = Logger.getLogger(ConnManager.class);
    public static ConnManager getManager() {
        if (manager == null) {
            manager = new ConnManager();
        }
        return manager;
    }

    //连接管理 <连接标识，连客户端对象>
    private static ConcurrentHashMap<String, ChannelHandlerContext> clients = new ConcurrentHashMap<>();

    //tcp连接断开时 删除记录
    void conn_remove(String str_id) {

    }

    //tcp连接时 保存记录
    void conn_register() {

    }

}
